﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Page/Site.Master" AutoEventWireup="true" CodeBehind="Quotes.aspx.cs" Inherits="ERP.Page.Quotes" %>

<%@ MasterType VirtualPath="~/Page/Site.Master" %>
<%@ Register Src="~/PageUC/QuotesUC.ascx" TagPrefix="uc1" TagName="QuotesUC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script>
        function setSelected(selectObj, valueToSet) {
            for (var i = 0; i < selectObj.options.length; i++) {
                if (selectObj.options[i].value == valueToSet) {
                    selectObj.options[i].selected = true;
                    return;
                }
            }
        }
        function DetailRows(x) {
            //gets table
            var getTable = document.getElementById('MyTable');
            //gets cells of current row  
            var getCells = getTable.rows.item(x.rowIndex).cells;

            document.getElementById('<%=QuotesUC.lbID.ClientID %>').value = getCells.item(0).innerHTML;
            document.getElementById('<%=QuotesUC.txtMaBaoGia.ClientID %>').disabled = true;
            document.getElementById('<%=QuotesUC.txtMaBaoGia.ClientID %>').value = getCells.item(3).innerHTML;
            setSelected(document.getElementById('<%=QuotesUC.drKhachHang.ClientID %>'), getCells.item(4).innerHTML);

            $("#baogia").dialog("open");
        }
    </script>
    <script>
        function pageLoad() {
            //-------------------Tooltip-------------------
            Tooltip('#btnAdd');
            Tooltip('.btn-delete');
            Tooltip('.btn-excel');
            Tooltip('.btn-search');
            Tooltip('.btn-reload');
            Tooltip('.btn-save');

            //--------------------Popup--------------------
            PopupUpdate('#baogia');

            //--------------------DatePicker--------------------
            DatePicker('.textbox_child_text_ngay');
            MarkInputDay('.textbox_child_text_ngay');
            //------------------TabletSort-----------------
            TableSort('#MyTable');
            TableSort('#MyTableProductQuotes');
            TableSort('#MyTableQuotesProduct');
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!-------------Edit-Dữ-Liệu-------------->
        <uc1:QuotesUC runat="server" ID="QuotesUC" />
    <!--------------Kêt-thúc----------------->
</asp:Content>
